package com.freesky.biz.rights.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.freesky.common.core.domain.BaseEntity;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 券码批次
 */
@Data
@TableName("tec_rights_encrypt_batch")
public class EncryptBatchEntity extends BaseEntity {
    @TableId
    private String id;

    @NotBlank(message = "批次名称不能为空")
    private String batchName;

    @NotBlank(message = "营销活动ID不能为空")
    private String busiId;

    @TableField(exist = false)
    private String busiName;

    @NotBlank(message = "权益活动ID不能为空")
    private String activityId;

    @TableField(exist = false)
    private String activityName;

    @TableField(exist = false)
    private Long amt;

    @NotNull(message = "有效期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date validTime;

    @NotNull(message = "状态不能为空")
    private Integer status;

    @NotNull(message = "总分配数量不能为空")
    private Long totalCoupons;

    private Long usedCoupons;

    private String delFlag;

}
